package com.dongdong.bookstore.module.uniappms.controller;

import com.dongdong.bookstore.module.cms.controller.UserController;
import com.dongdong.bookstore.module.cms.service.UserService;
import com.dongdong.bookstore.module.cms.viewmodel.UserLoginParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author 林泉梁
 * @version 1.0
 */
@Api(tags = "小程序用户认证模块")
@RestController
@RequestMapping("/api/auth")
public class UniUserAuthController {
    @Autowired
    private UserController userController;


    @ApiOperation("小程序用户登录")
    @PostMapping("/login")
    public Map<String,String> login(@RequestBody UserLoginParam userLoginParam){
        return userController.login(userLoginParam);
    }



}
